package com.zhigh.calcite.startproject.mapper;

import com.zhigh.calcite.startproject.schema.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface SalesMapper {

    @Select("select * from sale.SALES order by NAME")
    @Result(column = "DEPTNO", property = "depNo")
    List<Employee> getAll();

    @Select("select * from sale.SALES where deptno = #{depNo}")
    @Result(column = "DEPTNO", property = "depNo")
    Employee getByDepNo(Integer depNo);
}
